True if key has ever been saved (and not since cleared).
save_has(key) -> bool| Name | Type |
|---|---|
key | string |
bool
True if key has ever been saved and not since cleared. Useful to tell "never set" apart from "set to a value that happens to equal your fallback" - a case save_get alone cannot distinguish, since it returns the same fallback either way.
if (save_has("high_score")) {
var best = save_get("high_score", 0);
}Only reads the value if it was actually ever saved - useful when "never saved" needs different handling than "saved as 0."